.\"   $Id: autresizeblock.3,v 1.1 2002/03/21 13:17:24 ludo Exp $
.\" @(#)autresizeblock.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
.TH AUTRESIZEBLOCK 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS"
.SH NAME
autresizeblock \- resizes a memory block
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "aut101.h"
  char \(**autresize( Source, OldSize, NewSize )
   char         \(**Source;
   unsigned int OldSize;
   unsigned int NewSize;
.ft R
.fi
.SH PARAMETERS
.TP 20
\fISource\fP
Pointer to the memory block to be resized.
.TP
\fIOldSize\fP
Old size of the memory block.
.TP
\fINewSize\fP
New size of the memory block.
.SH DESCRIPTION
\fBautresizeblock\fP resizes a memory block  from \fIOldSize\fP to 
\fINewSize\fP. if \fINewSize\fP is greater than \fIOldSize\fP then
the new bytes are set to zero.
.br
.SH RETURN VALUE
\fBautresizeblock\fP returns the pointer to the resized block.
.SH ERRORS
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"autresize: resize error, can't continue !"
.ft R
.RS
System break can't be moved anymore, no more memory can be retrieved from the system.
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "aut101.h"
     char \(**concatstring( t, s )
        char \(** t;
        char \(** s;
     {
        t = (char \(**)autresizeblock( t, strlen(t)+1, strlen(t)+strlen(s)+1);
        strcat(t, s);
        return t;
     }
.ft R
.fi
.SH SEE ALSO
.BR aut (1),
.BR autallocheap(3),
.BR autallocblock(3),
.BR autfreeblock(3),
.BR autfreeheap(3).


.so man1/alc_bug_report.1

